class DynamicModel {
  int? userId;
  String? usercode;
  String? nickname;
  String? mobile;
  String? avatar;
  int? gender;
  int? age;
  String? tag;
  String? icon;
  String? city;
  int? userState;
  int? openVideoStatus;
  int? openMsgStatus;
  int? vip;
  int? vipLevel;
  String? vipDesc;
  String? dateline;
  int? isAnchor;
  int? isOnline;

  /// 是否关注: 0-未关注 1-已关注
  int? isFollow;
  int? isFans;
  int? isBlack;
  String? remarkName;
  int? id;
  String? content;
  int? isLike;
  int? likeCount;
  int? rewardCount;
  String? createTime;
  bool? showAllText;
  List<DynamicImage>? images;
  List<DynamicLiker>? likers;

  DynamicModel(
      {userId,
      usercode,
      nickname,
      mobile,
      avatar,
      gender,
      age,
      tag,
      icon,
      city,
      userState,
      openVideoStatus,
      openMsgStatus,
      vip,
      vipLevel,
      vipDesc,
      dateline,
      isAnchor,
      isOnline,
      isFollow,
      isFans,
      isBlack,
      remarkName,
      id,
      content,
      isLike,
      likeCount,
      rewardCount,
      createTime,
      images,
      likers,
      showAllText});

  DynamicModel.fromJson(Map<String, dynamic> json) {
    userId = json['user_id'];
    usercode = json['usercode'];
    nickname = json['nickname'];
    mobile = json['mobile'];
    avatar = json['avatar'];
    gender = json['gender'];
    age = json['age'];
    tag = json['tag'];
    icon = json['icon'];
    city = json['city'];
    userState = json['user_state'];
    openVideoStatus = json['open_video_status'];
    openMsgStatus = json['open_msg_status'];
    vip = json['vip'];
    vipLevel = json['vip_level'];
    vipDesc = json['vip_desc'];
    dateline = json['dateline'];
    isAnchor = json['is_anchor'];
    isOnline = json['is_online'];
    isFollow = json['is_follow'];
    isFans = json['is_fans'];
    isBlack = json['is_black'];
    remarkName = json['remark_name'];
    id = json['id'];
    content = json['content'];
    isLike = json['is_like'];
    likeCount = json['like_count'];
    rewardCount = json['reward_count'];
    createTime = json['create_time'];
    if (json['images'] != null) {
      images = <DynamicImage>[];
      json['images'].forEach((v) {
        images!.add(DynamicImage.fromJson(v));
      });
    }
    if (json['likers'] != null) {
      likers = <DynamicLiker>[];
      json['likers'].forEach((v) {
        likers!.add(DynamicLiker.fromJson(v));
      });
    }
    showAllText = false;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['user_id'] = userId;
    data['usercode'] = usercode;
    data['nickname'] = nickname;
    data['mobile'] = mobile;
    data['avatar'] = avatar;
    data['gender'] = gender;
    data['age'] = age;
    data['tag'] = tag;
    data['icon'] = icon;
    data['city'] = city;
    data['user_state'] = userState;
    data['open_video_status'] = openVideoStatus;
    data['open_msg_status'] = openMsgStatus;
    data['vip'] = vip;
    data['vip_level'] = vipLevel;
    data['vip_desc'] = vipDesc;
    data['dateline'] = dateline;
    data['is_anchor'] = isAnchor;
    data['is_online'] = isOnline;
    data['is_follow'] = isFollow;
    data['is_fans'] = isFans;
    data['is_black'] = isBlack;
    data['remark_name'] = remarkName;
    data['id'] = id;
    data['content'] = content;
    data['is_like'] = isLike;
    data['like_count'] = likeCount;
    data['reward_count'] = rewardCount;
    data['create_time'] = createTime;
    if (images != null) {
      data['images'] = images!.map((v) => v.toJson()).toList();
    }
    if (likers != null) {
      data['likers'] = likers!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class DynamicImage {
  String? url;
  int? width;
  int? height;
  String? exts;

  DynamicImage({url, width, height, exts});

  DynamicImage.fromJson(Map<String, dynamic> json) {
    url = json['url'];
    width = json['width'];
    height = json['height'];
    exts = json['exts'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['url'] = url;
    data['width'] = width;
    data['height'] = height;
    data['exts'] = exts;
    return data;
  }
}

class DynamicLiker {
  int? userId;
  String? usercode;
  String? nickname;
  String? mobile;
  String? avatar;
  int? gender;
  int? age;
  String? tag;
  String? icon;
  String? city;
  int? userState;
  int? openVideoStatus;
  int? openMsgStatus;
  int? vip;
  int? vipLevel;
  String? vipDesc;
  String? dateline;
  int? isAnchor;
  int? isOnline;

  DynamicLiker(
      {userId,
      usercode,
      nickname,
      mobile,
      avatar,
      gender,
      age,
      tag,
      icon,
      city,
      userState,
      openVideoStatus,
      openMsgStatus,
      vip,
      vipLevel,
      vipDesc,
      dateline,
      isAnchor,
      isOnline});

  DynamicLiker.fromJson(Map<String, dynamic> json) {
    userId = json['user_id'];
    usercode = json['usercode'];
    nickname = json['nickname'];
    mobile = json['mobile'];
    avatar = json['avatar'];
    gender = json['gender'];
    age = json['age'];
    tag = json['tag'];
    icon = json['icon'];
    city = json['city'];
    userState = json['user_state'];
    openVideoStatus = json['open_video_status'];
    openMsgStatus = json['open_msg_status'];
    vip = json['vip'];
    vipLevel = json['vip_level'];
    vipDesc = json['vip_desc'];
    dateline = json['dateline'];
    isAnchor = json['is_anchor'];
    isOnline = json['is_online'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['user_id'] = userId;
    data['usercode'] = usercode;
    data['nickname'] = nickname;
    data['mobile'] = mobile;
    data['avatar'] = avatar;
    data['gender'] = gender;
    data['age'] = age;
    data['tag'] = tag;
    data['icon'] = icon;
    data['city'] = city;
    data['user_state'] = userState;
    data['open_video_status'] = openVideoStatus;
    data['open_msg_status'] = openMsgStatus;
    data['vip'] = vip;
    data['vip_level'] = vipLevel;
    data['vip_desc'] = vipDesc;
    data['dateline'] = dateline;
    data['is_anchor'] = isAnchor;
    data['is_online'] = isOnline;
    return data;
  }
}
